import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/view/login/index.vue'
import Home from '@/view/home/index.vue'
import school from '@/view/school/index.vue'
import plan from '@/view/plan/index.vue'
import addSchool from '@/view/school/components/add.vue'
import editSchool from '@/view/school/components/edit.vue'
import addPlan from '@/view/plan/components/add.vue'
import editPlan from '@/view/plan/components/edit.vue'
import editCopyPlan from '@/view/plan/components/editCopy.vue'
import planProgress from '@/view/plan/components/progress.vue'
import query from '@/view/query'
import schoolPlan from '@/view/schoolPlan'
import operatingDiary from '@/view/operatingDiary'
import operationLog from '@/view/operationLog'
import permissions from '@/view/permissions'
import addRole from '@/view/permissions/components/role/addRole'
import editRole from '@/view/permissions/components/role/editRole'
import viewRole from '@/view/permissions/components/role/viewRole'
import hierarchy from '@/view/hierarchy'
import management from '@/view/management'
import schoolarchives from '@/view/hierarchy/components/archives'
import student from '@/view/student'
import archives from '@/view/student/components/archives.vue'
import checkReport from '@/view/checkReport'
import addSchoolRole from '@/view/management/components/role/addRole.vue'
import editSchoolRole from '@/view/management/components/role/editRole.vue'
import viewSchoolRole from '@/view/management/components/role/viewRole.vue'
import addSchoolPlan from '@/view/schoolPlan/components/add.vue'
import editSchoolPlan from '@/view/schoolPlan/components/edit.vue'
import editCopySchoolPlan from '@/view/schoolPlan/components/editCopy.vue'
import schoolPlanProgress from '@/view/schoolPlan/components/progress.vue'
import inventoryManagement from '@/view/inventoryManagement'
import addStudentsScale from '@/view/inventoryManagement/components/students/addStudentsScale.vue'
import editStudentsScale from '@/view/inventoryManagement/components/students/editStudentsScale.vue'
import crisis from '@/view/crisis'
import crisisAddPlan from '@/view/crisis/components/addPlan.vue'
import crisisEditPlan from '@/view/crisis/components/editPlan.vue'
import supplement from '@/view/crisis/components/supplement.vue'
import warning from '@/view/warning/index.vue'
import studentCrisis from '@/view/crisis/components/studentCrisis.vue'
import dailyReport from '@/view/crisis/components/dailyReport.vue'
import dailyReportDetails from '@/view/crisis/components/components/dailyReport.vue'
import addWarning from '@/view/crisis/components/components/addWarning.vue'
import answer from '@/view/checkReport/components/personal/components/answer.vue'
import UsersManagement from '@/view/users_management/index.vue'
import addUsersManagement from '@/view/users_management/addUsers_management.vue'
import updateManagement from '@/view/users_management/update_management.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: '登录',
      component: Login
    },
    {
      path: '/home',
      name: '登录',
      component: Home,
      redirect: 'school',
      children: [
        {
          path: '/users_management',
          name: '用户账号管理',
          component: UsersManagement
        },
        {
          path: '/addUsers_management',
          name: '添加账号',
          component: addUsersManagement
        },
        {
          path: '/update_management',
          name: '修改权限',
          component: updateManagement
        },
        {
          path: '/query',
          name: '测评查询',
          component: query
        },
        {
          path: '/school',
          name: '学校信息',
          component: school
        },
        {
          path: '/addSchool',
          name: '新增学校信息',
          component: addSchool
        },
        {
          path: '/editSchool',
          name: '编辑学校信息',
          component: editSchool
        },
        {
          path: '/plan',
          name: '平台计划',
          component: plan
        },
        {
          path: '/addPlan',
          name: '新增测评计划',
          component: addPlan
        },
        {
          path: '/editPlan',
          name: '编辑测评计划',
          component: editPlan
        },
        {
          path: '/editCopyPlan',
          name: '复制测评计划',
          component: editCopyPlan
        },
        {
          path: '/planProgress',
          name: '测评进度',
          component: planProgress
        },
        {
          path: '/schoolPlan',
          name: '学校计划',
          component: schoolPlan
        },
        {
          path: '/permissions',
          name: '人员权限',
          component: permissions
        },
        {
          path: '/operationLog',
          name: '操作日志',
          component: operationLog
        },
        {
          path: '/operatingDiary',
          name: '系统设置',
          component: operatingDiary
        },
        {
          path: '/addRole',
          name: '添加角色',
          component: addRole
        },
        {
          path: '/editRole',
          name: '编辑角色',
          component: editRole
        },
        {
          path: '/viewRole',
          name: '查看角色',
          component: viewRole
        },
        {
          path: '/hierarchy',
          name: '层级管理',
          component: hierarchy
        },
        {
          path: '/management',
          name: '人员管理',
          component: management
        },
        {
          path: '/schoolarchives',
          name: '学校档案',
          component: schoolarchives
        },
        {
          path: '/student',
          name: '学生管理',
          component: student
        },
        {
          path: '/archives',
          name: '个人档案',
          component: archives
        },
        {
          path: '/checkReport',
          name: '查看报告',
          component: checkReport
        },
        {
          path: '/addSchoolRole',
          name: '添加学校人员角色',
          component: addSchoolRole
        },
        {
          path: '/editSchoolRole',
          name: '编辑学校人员角色',
          component: editSchoolRole
        },
        {
          path: '/viewSchoolRole',
          name: '查看学校人员角色',
          component: viewSchoolRole
        },
        {
          path: '/addSchoolPlan',
          name: '新增学校计划',
          component: addSchoolPlan
        },
        {
          path: '/editSchoolPlan',
          name: '编辑学校计划',
          component: editSchoolPlan
        },
        {
          path: '/editCopySchoolPlan',
          name: '复制编辑学校计划',
          component: editCopySchoolPlan
        },
        {
          path: '/schoolPlanProgress',
          name: '学校计划测评进度',
          component: schoolPlanProgress
        },
        {
          path: '/inventoryManagement',
          name: '量表管理',
          component: inventoryManagement
        },
        {
          path: '/addStudentsScale',
          name: '添加学生量表',
          component: addStudentsScale
        },
        {
          path: '/editStudentsScale',
          name: '编辑学生量表',
          component: editStudentsScale
        },
        {
          path: '/crisis',
          name: '危机管理',
          component: crisis
        },
        {
          path: '/crisisAddPlan',
          name: '添加危机处理方案',
          component: crisisAddPlan
        },
        {
          path: '/crisisEditPlan',
          name: '编辑危机处理方案',
          component: crisisEditPlan
        },
        {
          path: '/supplement',
          name: '补充信息',
          component: supplement
        },
        {
          path: '/warning',
          name: '预警管理',
          component: warning
        },
        {
          path: '/studentCrisis',
          name: '学生危机管理',
          component: studentCrisis
        },
        {
          path: '/dailyReport',
          name: '日常上报',
          component: dailyReport
        },
        {
          path: '/dailyReportDetails',
          name: '日常上报查详情',
          component: dailyReportDetails
        },
        {
          path: '/addWarning',
          name: '添加预警查看详情',
          component: addWarning
        },
        {
          path: '/answer',
          name: '作答详情',
          component: answer
        }
      ]
    }
  ]
})
